<?php
	
class Admin_Model_InboundDetail extends Admin_Model_Db_InboundDetail
{
	public function countPrintRow($inbound_details)
	{	
		$string_product_code="";
		foreach ($inbound_details as $inbound_detail)
		{
			if($string_product_code!="")
				$string_product_code.=",";
			$string_product_code.="'{$inbound_detail->inbound_detail_product_code}'";
		}
		$product=new Admin_Model_Product();				
		$sql="SELECT COUNT(*) 
		FROM tbl_product 
		WHERE product_code IN ($string_product_code) 
		GROUP BY product_product_group_code ";
		$row_count=2*($product->fetchOne($sql))+count($inbound_details);
		return $row_count;
	}
}